package com.hongsuan.pplive.mobileAPI.vo;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

import com.hongsuan.pplive.mobileAPI.utils.JsonUtils;

public class ReturnObject extends Status implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1223423232333L;

	private Object object;

	public Object getObject() {
		return object;
	}

	public void setObject(Object object) {
		this.object = object;
	}

	@Override
	public String toString() {
		Map<String, Object> data = new HashMap<>();
		data.put("code", super.getCode());
		data.put("message", super.getMessage());
		if (object != null) {
			data.put(object.getClass().getSimpleName(), object);
		}
		return JsonUtils.toJson(data);
	}

}
